package com.songyuesheng.app.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songyuesheng.app.commom.Result;
import com.songyuesheng.app.dto.ChangePasswordDto;
import com.songyuesheng.app.dto.LoginDto;
import com.songyuesheng.app.dto.RegisterDto;
import com.songyuesheng.app.entity.User;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author song
 * @date 2024/3/14 14:01
 */
@Service
public interface UserService extends IService<User> {
    Result<?> login(LoginDto loginDto);

    Result<?> register(RegisterDto registerDto);

    Result<?> changePassword(ChangePasswordDto changePasswordDto);

    Result<?> updateUserInfo(User user);

    Result<?> selectAllUser();

    Result<?> selectUserByPage(Integer pageNum, Integer pageSize, String username);

    Result<?> addUser(User user);

    Result<?> delUser(Integer id);

    Result<?> delBatchIds(List<Integer> ids);
    
    Result<?> updateAvatar(MultipartFile file);

    Result<?> getUserInfo();
}
